home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / mac / Mac_Files / Vendor Demos / NeuralWare folder / nw2v50 / grnn.nnc < prev    next >
Text File  |  1993-08-23  |  2KB  |  56 lines

  1. csv3.8        !file format
  2. ! Nov 92  (grnn.nnc)  General Regression Neural Network
  3. !************************************************************************
  4. !*                                    *
  5. !*    General Regression Neural Network Control Strategy        *
  6. !*                                    *
  7. !************************************************************************
  8. !
  9. !    *** Recall ***
  10. !
  11. !MASK     label    op-code    operands    comment
  12. L_saR_sa    trace    aux3        !  set trace option to aux3
  13. L_saR_sa    cset    recall,1    !  recall count
  14. !
  15. ! Initialize ce field with 1/N
  16.  
  17. L___R_sa    lset    in        !  input layer
  18. L___R_sa    io    read        !  get input data
  19. L___R_sa @rloop    math    sum        !  perform sum (for norm layer)
  20. L___R_sa    math    rnoise|tran|output
  21. L___R_sa    lset    cur,1        !  next layer
  22. L___R_sa    lcmp    out        !  at output layer ?
  23. L___R_sa    blt    @rloop        !  loop till done
  24. L___R_sa    io      rcltst
  25. L___R_sa    math    sum|ce=e|tran|output|e-=w|swap
  26. L___R_sa    io    write        !  write results
  27. L___R_sa    brct    @exit        !  skip to end
  28. !
  29. !    *** Learning ***
  30. !
  31. L_saR___    lset    in        !  start at input layer
  32. L_saR___    io    lrnin        !  get input data
  33. L_saR___ @lloop    math    sum|fire
  34. L_saR___    math    lnoise|tran|output|learn|fire
  35. L_saR___    lset    cur,1        !  next layer
  36. L_saR___    lcmp    out,-1        !  AT summation layer ?
  37. L_saR___    blt    @lloop        !  loop till done
  38.  
  39. ! Following assumes ce contain 1,0,0...,0.  "Divide" transfer
  40. ! function initialization should ensure this.
  41. L_saR___    math    e=ce            !  ce contains 1,0,0...0
  42. L_saR___    lset    out        !  Output layer
  43. L_saR___    io    lrnout        !  get desired output
  44. L_saR___    math    backp|fire    !  back=propagate desired
  45. L_saR___    lset    cur,-1        !  summation layer
  46. L_saR___    math    learn|fire
  47. !
  48. !
  49. !    Now, recall to output layer
  50. !
  51. L_saR___     math    sum|lnoise|tran|output
  52. L_saR___    lset    cur,1        !  output layer
  53. L_saR___     math    sum|ce=e|tran|output|e-=w|swap ! final output
  54. L_saR___    io    lrnrslt        !  Actual Output in learn mode
  55. LisaRisa @exit    trace    0        !  turn off any trace function
  56.